(function(win){
	//定义不同棋子的移动规则
	
	//比较点和棋子时 ， 点的坐标只需要减去10 就可以当做棋子移动的坐标来比较了
	
	//定义车移动规则
	var CarRule=function(chess,endDot){ 
			var newchessList=[] //用来判断移动过程中是否有棋子
		if(endDot.info.type=='dot'){ //判断移动的终点位置是点还是对方的棋子
		
			if(chess.info.location.x+10==endDot.info.location.x){	
			
				chessList.forEach((item)=>{
					if(chess.info.location.x == item.instance.info.location.x){
						if(item.instance.info.location.y>chess.info.location.y){
							if(item.instance.info.location.y<endDot.info.location.y){
								newchessList.push(item)
							}
						}
						if(item.instance.info.location.y<chess.info.location.y){
							
								if(item.instance.info.location.y>endDot.info.location.y){
									newchessList.push(item)
									
								}
							
						}
					} 
				})
				
				if(newchessList.length!=0){
					return false
				}else{
					return true
				}
				
			}
			else if( chess.info.location.y+10==endDot.info.location.y){
				chessList.forEach((item)=>{
					if(chess.info.location.y == item.instance.info.location.y){
						if(item.instance.info.location.x>chess.info.location.x){
							if(item.instance.info.location.x<endDot.info.location.x){
								newchessList.push(item)
							}
						}
						if(item.instance.info.location.x<chess.info.location.x){						
								if(item.instance.info.location.x>endDot.info.location.x){
									newchessList.push(item)
								}
						}
					} 
				})
					
				if(newchessList.length!=0){
					return false
				}else{
					return true
				}
			}
			else{
				
				false
			}
		}else{
			if(chess.info.camp!=endDot.info.camp){
				if(chess.info.location.x==endDot.info.location.x){
					chessList.forEach((item)=>{
						if(chess.info.location.x == item.instance.info.location.x){
							if(item.instance.info.location.y>chess.info.location.y){
								if(item.instance.info.location.y<endDot.info.location.y){
									newchessList.push(item)
								}
							}
							if(item.instance.info.location.y<chess.info.location.y){
								
									if(item.instance.info.location.y>endDot.info.location.y){
										newchessList.push(item)
										
									}
								
							}
						} 
					})
					
					if(newchessList.length!=0){
						return false
					}else{
						return true
					}
				}
				else if( chess.info.location.y==endDot.info.location.y){
					chessList.forEach((item)=>{
						if(chess.info.location.y == item.instance.info.location.y){
							if(item.instance.info.location.x>chess.info.location.x){
								if(item.instance.info.location.x<endDot.info.location.x){
									newchessList.push(item)
								}
							}
							if(item.instance.info.location.x<chess.info.location.x){						
									if(item.instance.info.location.x>endDot.info.location.x){
										newchessList.push(item)
									}
							}
						} 
					})
						
					if(newchessList.length!=0){
						return false
					}else{
						return true
					}
				}
				else{
					return false
				} 
			}else{
				return false
			}
				
		}
	}
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	//定义马移动规则
	var HorseRule=function(chess,endDot){
		console.log(1)
		if(endDot.info.type=='dot'){
		
			if(chess.info.location.x-50+10==endDot.info.location.x){	
				if(chess.info.location.y+100+10==endDot.info.location.y||chess.info.location.y-100+10==endDot.info.location.y){
				
					return ma(chess,endDot)
				}else{
					false
				}
			
			}else if(chess.info.location.x+50+10==endDot.info.location.x){
				if(chess.info.location.y+100+10==endDot.info.location.y||chess.info.location.y-100+10==endDot.info.location.y){
					return ma(chess,endDot)
				}else{
					return false
				}
				
		}
		else if(chess.info.location.x+100+10==endDot.info.location.x){
				if(chess.info.location.y+50+10==endDot.info.location.y||chess.info.location.y-50+10==endDot.info.location.y){
					return ma(chess,endDot)
				}else{
					return false
				}
				
		}
		else if(chess.info.location.x-100+10==endDot.info.location.x){
				if(chess.info.location.y+50+10==endDot.info.location.y||chess.info.location.y-50+10==endDot.info.location.y){
				return ma(chess,endDot)
				}else{
					return false
				}
				
		}
		else{
			return false
		}
		
	}else{
			if(chess.info.camp!=endDot.info.camp){
				if(chess.info.location.x-50==endDot.info.location.x){
						if(chess.info.location.y+100==endDot.info.location.y||chess.info.location.y-100==endDot.info.location.y){
							return ma(chess,endDot)
						}else{
							false
						}
					
					}else if(chess.info.location.x+50==endDot.info.location.x){
						if(chess.info.location.y+100==endDot.info.location.y||chess.info.location.y-100==endDot.info.location.y){
							return ma(chess,endDot)
						}else{
							return false
						}
						
				}
				else if(chess.info.location.x+100==endDot.info.location.x){
					
						if(chess.info.location.y+50==endDot.info.location.y||chess.info.location.y-50==endDot.info.location.y){
							return ma(chess,endDot)
						}else{
							return false
						}
						
				}
				else if(chess.info.location.x-100==endDot.info.location.x){
						if(chess.info.location.y+50==endDot.info.location.y||chess.info.location.y-50==endDot.info.location.y){
							return ma(chess,endDot)
						}else{
							return false
						}
						
				}
				else{
					return false
				}
			}
				
		}
	}
	
	
	
	
	
	
	
	//定义象移动规则
	var ElephantRule=function(chess,endDot){
		if(chess.info.camp=='red'){//红色阵营
			if(endDot.info.type=='dot'){
				if(endDot.info.location.y>195){
					return false
				}else{//没过河
				if(chess.info.location.x-100+10==endDot.info.location.x || chess.info.location.x+100+10==endDot.info.location.x){
					if(chess.info.location.y-100+10==endDot.info.location.y || chess.info.location.y+100+10==endDot.info.location.y){
							var maxX='',maxY='',minX='',minY=''
								if(chess.info.location.x>endDot.info.location.x){
									maxX=chess.info.location.x+15
									minX=endDot.info.type=='dot'?endDot.info.location.x+5:endDot.info.location.x+15
								}else{
									maxX=endDot.info.type=='dot'?endDot.info.location.x+5:endDot.info.location.x+15
									minX=chess.info.location.x+15
								}
									
								if(chess.info.location.y>endDot.info.location.y){
									maxY=chess.info.location.y+15
									minY=endDot.info.type=='dot'?endDot.info.location.y+5:endDot.info.location.y+15
								}else{
									maxY=endDot.info.type=='dot'?endDot.info.location.y+5:endDot.info.location.y+15
									minY=chess.info.location.y+15
								}
							if(chessList.some(item=> {
								var {x,y}=item.instance.info.location
								x+=15,y+=15
								return x>minX&&x<maxX&&y>minY&&y<maxY
							})){
								
								var item=chessList.find(item=> {
								var {x,y}=item.instance.info.location
								return x>minX&&x<maxX&&y>minY&&y<maxY
							})
								console.log(item)
								return false
							}
										
							return true
						
					}else{
						return false
					}
				}else{
					return false
				}
				
					
				}				
			}else{
				if(endDot.info.location.y>185){
					return false
				}else{//不能吃河对面的
					if(chess.info.camp!=endDot.info.camp){
						if(chess.info.location.x-100==endDot.info.location.x || chess.info.location.x+100==endDot.info.location.x){
							if(chess.info.location.y-100==endDot.info.location.y || chess.info.location.y+100==endDot.info.location.y){
								var maxX='',maxY='',minX='',minY=''
									if(chess.info.location.x>endDot.info.location.x){
										maxX=chess.info.location.x+15
										minX=endDot.info.type=='dot'?endDot.info.location.x+5:endDot.info.location.x+15
									}else{
										maxX=endDot.info.type=='dot'?endDot.info.location.x+5:endDot.info.location.x+15
										minX=chess.info.location.x+15
									}
										
									if(chess.info.location.y>endDot.info.location.y){
										maxY=chess.info.location.y+15
										minY=endDot.info.type=='dot'?endDot.info.location.y+5:endDot.info.location.y+15
									}else{
										maxY=endDot.info.type=='dot'?endDot.info.location.y+5:endDot.info.location.y+15
										minY=chess.info.location.y+15
									}
								if(chessList.some(item=> {
									var {x,y}=item.instance.info.location
									x+=15,y+=15
									return x>minX&&x<maxX&&y>minY&&y<maxY
								})){
									
									var item=chessList.find(item=> {
									var {x,y}=item.instance.info.location
									return x>minX&&x<maxX&&y>minY&&y<maxY
								})
									console.log(item)
									return false
								}
											
								return true
								
							}else{
								return false
							}
						}else{
							return false
						}
					}else{
						return false
					}
					
					
				}
			}
				
		}else{//蓝色阵营
			
			if(endDot.info.type=='dot'){
				if(endDot.info.location.y<245){
					return false
				}else{//没过河
					if(chess.info.location.x-100+10==endDot.info.location.x || chess.info.location.x+100+10==endDot.info.location.x){
						if(chess.info.location.y-100+10==endDot.info.location.y || chess.info.location.y+100+10==endDot.info.location.y){
							var maxX='',maxY='',minX='',minY=''
								if(chess.info.location.x>endDot.info.location.x){
									maxX=chess.info.location.x+15
									minX=endDot.info.type=='dot'?endDot.info.location.x+5:endDot.info.location.x+15
								}else{
									maxX=endDot.info.type=='dot'?endDot.info.location.x+5:endDot.info.location.x+15
									minX=chess.info.location.x+15
								}
									
								if(chess.info.location.y>endDot.info.location.y){
									maxY=chess.info.location.y+15
									minY=endDot.info.type=='dot'?endDot.info.location.y+5:endDot.info.location.y+15
								}else{
									maxY=endDot.info.type=='dot'?endDot.info.location.y+5:endDot.info.location.y+15
									minY=chess.info.location.y+15
								}
							if(chessList.some(item=> {
								var {x,y}=item.instance.info.location
								x+=15,y+=15
								return x>minX&&x<maxX&&y>minY&&y<maxY
							})){
								
								var item=chessList.find(item=> {
								var {x,y}=item.instance.info.location
								return x>minX&&x<maxX&&y>minY&&y<maxY
							})
								console.log(item)
								return false
							}
										
							return true
							
						}else{
							return false
						}
					}else{
						return false
					}
				}
			}else{
				if(endDot.info.location.y<235){
					return false
				}else{//不能吃河对面的
					
					if(chess.info.camp!=endDot.info.camp){
						if(chess.info.location.x-100==endDot.info.location.x || chess.info.location.x+100==endDot.info.location.x){
							if(chess.info.location.y-100==endDot.info.location.y || chess.info.location.y+100==endDot.info.location.y){
								var maxX='',maxY='',minX='',minY=''
									if(chess.info.location.x>endDot.info.location.x){
										maxX=chess.info.location.x+15
										minX=endDot.info.type=='dot'?endDot.info.location.x+5:endDot.info.location.x+15
									}else{
										maxX=endDot.info.type=='dot'?endDot.info.location.x+5:endDot.info.location.x+15
										minX=chess.info.location.x+15
									}
										
									if(chess.info.location.y>endDot.info.location.y){
										maxY=chess.info.location.y+15
										minY=endDot.info.type=='dot'?endDot.info.location.y+5:endDot.info.location.y+15
									}else{
										maxY=endDot.info.type=='dot'?endDot.info.location.y+5:endDot.info.location.y+15
										minY=chess.info.location.y+15
									}
								if(chessList.some(item=> {
									var {x,y}=item.instance.info.location
									x+=15,y+=15
									return x>minX&&x<maxX&&y>minY&&y<maxY
								})){
									
									var item=chessList.find(item=> {
									var {x,y}=item.instance.info.location
									return x>minX&&x<maxX&&y>minY&&y<maxY
								})
									console.log(item)
									return false
								}
											
								return true
								
							}else{
								return false
							}
						}else{
							return false
						}
					}else{
						return false
					}
					
				}
			}
			
		}
		
	
	}
	
	
	
	//定义士移动规则
	var guardsRule=function(chess,endDot){
		if(chess.info.camp=='red'){//红色方阵营	
			if(endDot.info.type=='dot'){
				if(endDot.info.location.x>245 || endDot.info.location.x<145){
					return false
				}else{
					if(endDot.info.location.y>95){
						return false
					}else{
						if(chess.info.location.x-50+10==endDot.info.location.x || chess.info.location.x+50+10==endDot.info.location.x){
							if(chess.info.location.y-50+10==endDot.info.location.y || chess.info.location.y+50+10==endDot.info.location.y){
								return true
								
							}else{
								return false
							}
						}else{
							return false
						}
					}
				}
			}
			else{
				if(endDot.info.location.x>235 || endDot.info.location.x<135){
					return false
				}else{
					if(endDot.info.location.y>85){
						return false
					}else{
						if(chess.info.camp!=endDot.info.camp){
							if(chess.info.location.x-50==endDot.info.location.x || chess.info.location.x+50==endDot.info.location.x){
								if(chess.info.location.y-50==endDot.info.location.y || chess.info.location.y+50==endDot.info.location.y){
									return true
									
								}else{
									return false
								}
							}else{
								return false
							}
						}else{
							return false
						}
						}
					}
				}
		}else{//蓝色方阵营
			if(endDot.info.type=='dot'){
				if(endDot.info.location.x>245 || endDot.info.location.x<145){
					return false
				}else{
					if(endDot.info.location.y<345){
						return false
					}else{
						if(chess.info.location.x-50+10==endDot.info.location.x || chess.info.location.x+50+10==endDot.info.location.x){
							if(chess.info.location.y-50+10==endDot.info.location.y || chess.info.location.y+50+10==endDot.info.location.y){
								return true
								
							}else{
								return false
							}
						}else{
							return false
						}
						
						}
					}
				}
			else{
				if(endDot.info.location.x>235 || endDot.info.location.x<135){
					return false
				}else{
					if(endDot.info.location.y<335){
						return false
					}else{
						if(chess.info.camp!=endDot.info.camp){
							if(chess.info.location.x-50==endDot.info.location.x || chess.info.location.x+50==endDot.info.location.x){
								if(chess.info.location.y-50==endDot.info.location.y || chess.info.location.y+50==endDot.info.location.y){
									return true
									
								}else{
									return false
								}
							}else{
								return false
							}
						}else{
							return false
						}
						
						}
					}
				}
		}
		
	
	}
	
	
	//定义炮移动规则
	var gunRule=function(chess,endDot){
		var newchessList=[] //用来判断移动过程中是否有棋子
		if(endDot.info.type=='dot'){ //判断移动的终点位置是点还是对方的棋子
		
			if(chess.info.location.x+10==endDot.info.location.x){	
			
				chessList.forEach((item)=>{
					if(chess.info.location.x == item.instance.info.location.x){
						if(item.instance.info.location.y>chess.info.location.y){
							if(item.instance.info.location.y<endDot.info.location.y){
								newchessList.push(item)
							}
						}
						if(item.instance.info.location.y<chess.info.location.y){
							
								if(item.instance.info.location.y>endDot.info.location.y){
									newchessList.push(item)
									
								}
							
						}
					} 
				})
			
				if(newchessList.length!=0){
					return false
				}else{
					return true
				}
				
			}
			else if( chess.info.location.y+10==endDot.info.location.y){
				chessList.forEach((item)=>{
					if(chess.info.location.y == item.instance.info.location.y){
						if(item.instance.info.location.x>chess.info.location.x){
							if(item.instance.info.location.x<endDot.info.location.x){
								newchessList.push(item)
							}
						}
						if(item.instance.info.location.x<chess.info.location.x){						
								if(item.instance.info.location.x>endDot.info.location.x){
									newchessList.push(item)
								}
						}
					} 
				})
					
				if(newchessList.length!=0){
					return false
				}else{
					return true
				}
			}
			else{
				
				false
			}
		}else{
			
			if(chess.info.camp!=endDot.info.camp){
				
				if(chess.info.location.x==endDot.info.location.x){
					chessList.forEach((item)=>{
					
						if(chess.info.location.x == item.instance.info.location.x){
							
							if(item.instance.info.location.y>chess.info.location.y){
							
								if(item.instance.info.location.y<endDot.info.location.y){
										
									newchessList.push(item)
								}
							}
							if(item.instance.info.location.y<chess.info.location.y){
								
									if(item.instance.info.location.y>endDot.info.location.y){
										newchessList.push(item)
										
									}
								
							}
						} 
					})
						
					if(newchessList.length==1){
						return true
					}else{
						return false
					}
				}
				else if( chess.info.location.y==endDot.info.location.y){
					chessList.forEach((item)=>{
						if(chess.info.location.y == item.instance.info.location.y){
							if(item.instance.info.location.x>chess.info.location.x){
								if(item.instance.info.location.x<endDot.info.location.x){
									newchessList.push(item)
								}
							}
							if(item.instance.info.location.x<chess.info.location.x){						
									if(item.instance.info.location.x>endDot.info.location.x){
										newchessList.push(item)
									}
							}
						} 
					})
						
					if(newchessList.length==1){
						return true
					}else{
						return false
					}
				}
				else{
					return false
				} 
			}else{
				return false
			}
		}
	}
	
	
	
	var soldierRule=function(chess,endDot){
		//判断是阵营的兵，因为兵过河才能左右移动，但是兵是不能后退的
		if(chess.info.camp=='red'){//红色方阵营
			//判断是否过河
			if(chess.info.location.y>185){//已过河
				//判断移动的终点位置是点还是对方的棋子
				if(endDot.info.type=='dot'){ 
					if(chess.info.location.x+10==endDot.info.location.x){
						if(chess.info.location.y+50+10==endDot.info.location.y){
							return true
						}else{
							return false
						}
					}else if(chess.info.location.x+50+10==endDot.info.location.x ||chess.info.location.x-50+10==endDot.info.location.x)
					{
						if(chess.info.location.y+10==endDot.info.location.y){
							return true
						}else{
							return false
						}
						
					}		
				}else{
					if(chess.info.location.x==endDot.info.location.x){
						if(chess.info.location.y+50==endDot.info.location.y){
							return true
						}else{
							return false
						}
					}else if(chess.info.location.x+50==endDot.info.location.x ||chess.info.location.x-50==endDot.info.location.x)
					{
						if(chess.info.location.y==endDot.info.location.y){
							return true
						}else{
							return false
						}
						
					}						
					
				}
			}
			else{//未过河
					if(endDot.info.type=='dot'){ 
						if(chess.info.location.x+10!=endDot.info.location.x){
							return false
						}else{
							if(chess.info.location.y+50+10==endDot.info.location.y){
								return true
							}else{
								return false
							}
						}
						
					}else{
						if(chess.info.location.x!=endDot.info.location.x){
							return false
						}else{
							if(chess.info.location.y+50==endDot.info.location.y){
								return true
							}else{
								return false
							}
						}
					}
				
			}
					
		}else{//蓝方阵营
			//判断是否过河
			if(chess.info.location.y<235){//已过河
				//判断移动的终点位置是点还是对方的棋子
				if(endDot.info.type=='dot'){ 
					if(chess.info.location.x+10==endDot.info.location.x){
						if(chess.info.location.y-50+10==endDot.info.location.y){
							return true
						}else{
							return false
						}
					}else if(chess.info.location.x+50+10==endDot.info.location.x ||chess.info.location.x-50+10==endDot.info.location.x)
					{
						if(chess.info.location.y+10==endDot.info.location.y){
							return true
						}else{
							return false
						}
						
					}		
				}else{
					if(chess.info.location.x==endDot.info.location.x){
						if(chess.info.location.y-50==endDot.info.location.y){
							return true
						}else{
							return false
						}
					}else if(chess.info.location.x+50==endDot.info.location.x ||chess.info.location.x-50==endDot.info.location.x)
					{
						if(chess.info.location.y==endDot.info.location.y){
							return true
						}else{
							return false
						}
						
					}						
					
				}
			}
			else{//未过河
					if(endDot.info.type=='dot'){ 
						if(chess.info.location.x+10!=endDot.info.location.x){
							return false
						}else{
							if(chess.info.location.y-50+10==endDot.info.location.y){
								return true
							}else{
								return false
							}
						}
						
					}else{
						if(chess.info.location.x!=endDot.info.location.x){
							return false
						}else{
							if(chess.info.location.y-50==endDot.info.location.y){
								return true
							}else{
								return false
							}
						}
					}
				
			}
		}
		
	}
	
	
	
	
	
	
	var bossRule=function(chess,endDot){
		if(chess.info.camp=='red'){//红色方阵营	
			if(endDot.info.type=='dot'){ 
				if(endDot.info.location.x>245 || endDot.info.location.x<145){
					return false
				}else{
					if(endDot.info.location.y>95){
						return false
					}else{
						if(chess.info.location.x+10==endDot.info.location.x){
							if(chess.info.location.y+50+10==endDot.info.location.y || chess.info.location.y-50+10==endDot.info.location.y){
								return true
							}else{
								return false
							}
						}else if(chess.info.location.x+50+10==endDot.info.location.x || chess.info.location.x-50+10==endDot.info.location.x){
							if(chess.info.location.y+10==endDot.info.location.y){
								return true						
							}else{
								return false
							}
							
						}else{
							return false
						}
					}
				}
			}else{
				if(endDot.info.location.x>235 || endDot.info.location.x<135){
					return false
				}else{
					if(endDot.info.location.y>85){
						return false
					}else{
						if(chess.info.location.x==endDot.info.location.x){
							if(chess.info.location.y+50==endDot.info.location.y || chess.info.location.y-50==endDot.info.location.y){
								return true
							}else{
								return false
							}
						}else if(chess.info.location.x+50==endDot.info.location.x || chess.info.location.x-50==endDot.info.location.x){
							if(chess.info.location.y==endDot.info.location.y){
								return true						
							}else{
								return false
							}
							
						}else{
							return false
						}
					}
				}
				
				
			}
			
				
		}else{//蓝色方阵营
			
			if(endDot.info.type=='dot'){
				if(endDot.info.location.x>245 || endDot.info.location.x<145){
					return false
				}else{
					if(endDot.info.location.y<345){
						return false
					}else{
						if(chess.info.location.x+10==endDot.info.location.x){
							if(chess.info.location.y+50+10==endDot.info.location.y || chess.info.location.y-50+10==endDot.info.location.y){
								return true
							}else{
								return false
							}
						}else if(chess.info.location.x+50+10==endDot.info.location.x || chess.info.location.x-50+10==endDot.info.location.x){
							if(chess.info.location.y+10==endDot.info.location.y){
								return true						
							}else{
								return false
							}
							
						}else{
							return false
						}
					}
				}
			}else{
				if(endDot.info.location.x>235 || endDot.info.location.x<135){
					return false
				}else{
					if(endDot.info.location.y<335){
						return false
					}else{
						if(chess.info.location.x==endDot.info.location.x){
							if(chess.info.location.y+50==endDot.info.location.y || chess.info.location.y-50==endDot.info.location.y){
								return true
							}else{
								return false
							}
						}else if(chess.info.location.x+50==endDot.info.location.x || chess.info.location.x-50==endDot.info.location.x){
							if(chess.info.location.y==endDot.info.location.y){
								return true						
							}else{
								return false
							}
							
						}else{
							return false
						}
					}
				}
				
				
			}
			
			
		}
	}
	
	
	
	
	
	
	
	
	//关于马是否会蹩脚的逻辑
	var ma = function(chess,endDot){
			var x= chess.info.location.x-endDot.info.location.x
			var y= chess.info.location.y-endDot.info.location.y
			if(x<0){
				x=-x
			}
			if(y<0){
				y=-y
			}
			//以此判断这个马是走的竖行的日还是横行的日 
			if(x>y){//该马走横日
			
			    //判断是往左还是往右跳
				if(endDot.info.location.x>chess.info.location.x){ //往右跳
					//既然是以横日 的方式 往右方向跳 那么 就判断与该棋子 同 Y坐标 的 右侧是否有其他棋子
					if(
					chessList.some((item)=> item.instance.info.location.y==chess.info.location.y && item.instance.info.location.x-50==chess.info.location.x)
					){							
						return false
					}else{
						return true
					}
					
				}else{//往左跳
					//既然是以横日 的方式 往左方向跳 那么 就判断与该棋子 同 Y坐标 的 左侧是否有其他棋子
					if(
					chessList.some((item)=> item.instance.info.location.y==chess.info.location.y && item.instance.info.location.x+50==chess.info.location.x)
					){							
						return false
					}else{
						return true
					}	
				}
				
				
			}else{//该马走竖日
				
				//判断是往上还是往下跳
				if(endDot.info.location.y>chess.info.location.y){ //往下跳
					//既然是以竖日 的方式 往下方向跳 那么 就判断与该棋子 同 X坐标 的 下侧是否有其他棋子
					if(
					chessList.some((item)=> item.instance.info.location.x==chess.info.location.x && item.instance.info.location.y-50==chess.info.location.y)
					){							
						return false
					}else{
						return true
					}	
					
				}else{//往上跳
					//既然是以竖日 的方式 往上方向跳 那么 就判断与该棋子 同 X坐标 的 上侧是否有其他棋子
					if(
					chessList.some((item)=> item.instance.info.location.x==chess.info.location.x && item.instance.info.location.y+50==chess.info.location.y)
					){							
						return false
					}else{
						return true
					}	
				}
				
			}
			
			
			
			
	}
	
	
	
	
	win.rulesTypes={
		elephant:ElephantRule,
		horse:HorseRule,
		car:CarRule,
		guards:guardsRule,
		gun:gunRule,
		boss:bossRule,
		soldier:soldierRule
	}
	
	
	
})(window);